
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Data.SqlClient
Imports System.Text
Imports System.Data
Namespace WorkFlow.BBL
    Public Class OrgBBL
        Public Function GetOrg(ByVal OrganizationID As String, ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.OrgDAO = New WorkFlow.DAO.OrgDAO(dbName)
            Return db1.GetOrg(OrganizationID)
        End Function
        Public Function GetNotActive(ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.OrgDAO = New WorkFlow.DAO.OrgDAO(dbName)
            Return db1.GetNotActive()
        End Function
        Public Sub UpdateActiveStatus(ByVal Active As String, ByVal OrganizationID As String, ByVal dbName As String)
            Dim db1 As WorkFlow.DAO.OrgDAO = New WorkFlow.DAO.OrgDAO(dbName)
            db1.UpdateActiveStatus(Active, OrganizationID)
        End Sub
        Public Sub ChangeParent(ByVal Parent As String, ByVal OrganizationID As String, ByVal dbName As String)
            Dim db1 As WorkFlow.DAO.OrgDAO = New WorkFlow.DAO.OrgDAO(dbName)
            db1.ChangeParent(Parent, OrganizationID)
        End Sub
        Public Function InsertOrg(ByVal OrganizationName As String, ByVal Parent As String, ByVal Active As String, ByVal OrgEngName As String, ByVal OrgChnName As String, ByVal dbName As String) As Integer
            Dim db1 As WorkFlow.DAO.OrgDAO = New WorkFlow.DAO.OrgDAO(dbName)
            Return db1.InsertOrg(OrganizationName, Parent, Active, OrgEngName, OrgChnName)
        End Function
        Public Sub UpdateOrg(ByVal OrganizationName As String, ByVal Active As String, ByVal OrgEngName As String, ByVal OrgChnName As String, ByVal OrganizationID As String, ByVal dbName As String)
            Dim db1 As WorkFlow.DAO.OrgDAO = New WorkFlow.DAO.OrgDAO(dbName)
            db1.UpdateOrg(OrganizationName, Active, OrgEngName, OrgChnName, OrganizationID)
        End Sub

        Public Function GetOrgByParent(ByVal Parent As String, ByVal Active As String, ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.OrgDAO = New WorkFlow.DAO.OrgDAO(dbName)
            Return db1.GetOrgByParent(Parent, Active)
        End Function
        Public Function GetALLOrg(ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.OrgDAO = New WorkFlow.DAO.OrgDAO(dbName)
            Return db1.GetALLOrg()
        End Function
    End Class
End Namespace